package me.zhengjie.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * @Author xc_wang@probe-group.com
 * @Date 2021/12/6
 * @Description
 */
@Data
@ApiModel(value = "PageReq",description = "分页查询")
public class PageReq {

    @ApiModelProperty("查询页数,默认1")
    @NotNull(message = "查询页数不能为空")
    @Range(min = 1 , max = 10000000 , message = "查询页数需要在1和10000000之间")
    private Integer pageNo = 1;

    @ApiModelProperty("每页条数,默认10")
    @NotNull(message = "每页显示条数不能为空")
    @Range(min = 10 , max = 100, message = "每页显示条数需要在10和100之间")
    private Integer pageSize = 10;

}
